<template>
  <div>
    数据列表
    <div v-for="intent in intentionList">
      {{ intent.intention }}
    </div>
  </div>
</template>

<script lang="ts">
  import { defineComponent, Ref, ref } from 'vue';
  import { IntentionFormState } from '../types/form.interface';
  import { getIntention } from '/@/api/api';
  export default defineComponent({
    name: 'myCreateList',
    setup() {
      const intentionList: Ref<IntentionFormState[]> = ref([]);
      // intentionList.value = await getIntention();
      async function getData() {
        intentionList.value = (await getIntention()) as IntentionFormState[];
      }
      getData();
      // onBeforeMount(() => {
      //   getData();
      // });

      return {
        intentionList,
      };
    },
  });
</script>

<style scoped lang="less"></style>
